package com.aidex.system.domain;

import com.aidex.common.utils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode()
@Api(tags = "缓存信息")
public class SysCache {
    @ApiModelProperty("缓存名称")
    private String cacheName = "";

    @ApiModelProperty("缓存键名")
    private String cacheKey = "";

    @ApiModelProperty("缓存内容")
    private String cacheValue = "";

    @ApiModelProperty("备注")
    private String remark = "";


    public SysCache(String cacheName, String remark) {
        this.cacheName = cacheName;
        this.remark = remark;
    }

    public SysCache(String cacheName, String cacheKey, String cacheValue) {
        this.cacheName = StringUtils.replace(cacheName, ":", "");
        this.cacheKey = StringUtils.replace(cacheKey, cacheName, "");
        this.cacheValue = cacheValue;
    }

}

